package com.zgys.project_mgr.project.controller;

import com.zgys.project_mgr.project.service.Project2serverService;
import com.zgys.project_mgr.project.service.ProjectService;
import com.zgys.project_mgr.server.service.ServerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhouyang
 * @Description
 * @date 2018/09/28
 */
@RestController
@RequestMapping("project")
public class ProjectController {

    @Autowired
    ProjectService projectService;

    @Autowired
    ServerService serverService;

    @Autowired
    Project2serverService project2serverService;

    @GetMapping
    @ResponseBody
    public List<Object> test(){
        List<Object> list = new ArrayList<Object>();
        list.add(projectService.get(1));
        list.add(serverService.get(1));
        list.add(project2serverService.get(1));
        return list;
    }

}
